import { fileURLToPath, URL } from 'node:url'

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import tailwindcss from '@tailwindcss/vite'

export default defineConfig({
  plugins: 
  [
    vue(),
    tailwindcss(),
  ],
  server:
  {
    host: '0.0.0.0',
  },
  css: 
  {
    // css预处理器
    preprocessorOptions: 
    {
      scss: 
      {
        additionalData: '@use "@/assets/style/main" as *;',
      }
    }
  },
  resolve: 
  {
    alias: 
    {
      '@': fileURLToPath(new URL('./src', import.meta.url))
    },
  },
})
